<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Venue_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[venue_id]', $venueList, $row.venue_id, ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Site_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-site_name" class="form-control" name="row[site_name]" type="text" data-rule="required" value="{$row.site_name}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['1'=>__('Enable'), '2'=>__('Disable')], $row.status)}
        </div>
    </div>

        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Time_list')}:</label>
            <div class="col-xs-12 col-sm-8">
                <table class="table fieldlist" data-template="basictpl" data-name="row[time_list]" id="first-table">
                    <tr>
                        <td>{:__('时间段')}</td>
                        <td>{:__('价格')}</td>
                        <td width="100"></td>
                    </tr>
                    <tr>
                        <td colspan="5"><a href="javascript:;" class="btn btn-sm btn-success btn-append" style="display: none"><i class="fa fa-plus"></i> {:__('Append')}</a></td>
                    </tr>
                </table>

                <!--请注意实际开发中textarea应该添加个hidden进行隐藏-->
                <textarea name="row[time_list]" class="form-control" cols="30" rows="5" style="display: none">{$row.time_list}</textarea>
                <script id="basictpl" type="text/html">
                    <tr class="form-inline">
                        <td><input type="text" name="<%=name%>[<%=index%>][time]" class="form-control datetimepicker" style="width:260px" value="<%=row.time%>" placeholder="时间" readonly /></td>
                        <td><input type="number" min="0.01" step="0.01" name="<%=name%>[<%=index%>][price]" class="form-control" style="width:100px" value="<%=row.price%>" placeholder="价格"/></td>
                        <td>
                            <!--下面的两个按钮务必保留-->
<!--                            <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>-->
<!--                            <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>-->
                        </td>
                    </tr>
                </script>
            </div>
        </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
